<%@page contentType="text/html; charset=UTF-8"%>

<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<div class="wrapper registred">
	<div class="inner-wrapper">
		<h3 align="left">Friend Requests:</h3>
		<h3 align="center">&nbsp; &nbsp;You Have Friend Requests From:</h3>
		<c:choose>
			<c:when test='${searchStatus == "PERSON_HAVE_FRIEND_REQUESTS"}'>
				<table width="95%" border="0" align="center" class="search">
					<c:forEach items="${friendRequests}" var="temp">
						<tr>
							<c:choose>
								<c:when test='${temp.requestFrom.picture == null}'>
									<td width="5%" class="first">&nbsp; &nbsp;<a
										href="GoToSelectedPersonProfileServlet2?personID=${temp.requestFrom.id}"
										target="_blank"><img width="50" height="50"
											src="anonimus.jpg"></a>
									</td>
								</c:when>
								<c:when test='${temp.requestFrom.picture != null}'>
									<td width="5%" class="first">&nbsp; &nbsp;<a
										href="GoToSelectedPersonProfileServlet2?personID=${temp.requestFrom.id}"
										target="_blank"> <img width="50" height="50"
											src="/images/networx/profile/thumbnails/${temp.requestFrom.picture}"></a>
									</td>
								</c:when>
								<c:otherwise>
								</c:otherwise>
							</c:choose>
							<td width="60%" class="second"><h3>
									<a
										href="GoToSelectedPersonProfileServlet2?personID=${temp.requestFrom.id}"
										target="_blank">${temp.requestFrom.firstName}
										${temp.requestFrom.lastName}</a>
								</h3></td>

							<td><a
								href="AcceptFriendRequestServlet?personID=${temp.requestFrom.id}&friendRequestID=${temp.id}"
								onclick="friendRequestAcceptedMessage()">Accept</a></td>

							<td><a
								href="RejectFriendRequestServlet?personID=${temp.requestFrom.id}&friendRequestID=${temp.id}"
								onclick="friendRequestRejectedMessage()">Reject</a></td>
						</tr>
					</c:forEach>
				</table>
			</c:when>
			<c:when
				test='${searchStatus == "PERSON_DO_NOT_HAVE_FRIEND_REQUESTS"}'>
				<b style="color: red"><br>&nbsp; &nbsp;You Don't Have
					Friend Requests.</b>
			</c:when>
		</c:choose>
	</div>
</div>